fix: pass explicit node_limit in index_resource to avoid ls truncation#1344
Open
yc111233 wants to merge 1 commit intovolcengine:mainfrom
Open
fix: pass explicit node_limit in index_resource to avoid ls truncation#1344yc111233 wants to merge 1 commit intovolcengine:mainfrom
yc111233 wants to merge 1 commit intovolcengine:mainfrom
Conversation
viking_fs.ls() defaults to node_limit=1000, which silently truncates the file listing for directories with more than 1000 entries. This causes index_resource to miss files when reindexing large memory directories (e.g. 1800+ files), resulting in incomplete vector indexes. Fix: pass node_limit=10000 explicitly to viking_fs.ls() in index_resource to support larger directories. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
viking_fs.ls()defaults tonode_limit=1000, which silently truncates results for directories with more than 1000 entriesindex_resourcecallsls()without specifyingnode_limit, so large memory directories (e.g. 1800+ files) get silently truncatedRoot cause
viking_fs.ls()signature (line 1743):index_resource(line 354) calls it with default:Fix
Pass
node_limit=10000explicitly:Impact
Directories with up to 10,000 files will now be fully indexed. This fixes silent data loss during reindexing of large memory stores.
Test plan
index_resource🤖 Generated with Claude Code